//
//  MyConcernCell.swift
//  todaySwift
//
//  Created by ChokWah on 2018/3/13.
//  Copyright © 2018年 ChokWah. All rights reserved.
//

import UIKit
//import Kingfisher

class MyConcernCell: UICollectionViewCell, RegisterCellOrNib {
    
    @IBOutlet weak var tipsButton: UIButton!
    // 头像
    @IBOutlet weak var avatarImageView: UIImageView!
    // VIP标志
    @IBOutlet weak var vipImageView: UIImageView!
    // 用户名
    @IBOutlet weak var nameLabel: UILabel!
    var myConcern = MyConcern() {
        didSet {
            avatarImageView.kf.setImage(with: URL(string: myConcern.icon!))
            nameLabel.text = myConcern.name
            if let isVerify = myConcern.is_verify {
                vipImageView.isHidden = !isVerify
            }
            if let tips = myConcern.tips {
                tipsButton.isHidden = !tips
            }
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        tipsButton.layer.borderWidth = 1
        tipsButton.layer.borderColor = UIColor.white.cgColor
    }

}
